package com.aaa.system.service.impl;

import com.aaa.entity.UUserInfo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.aaa.system.service.UserInfoService;
import com.aaa.system.dao.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 祝云松
* @description 针对表【u_user_info】的数据库操作Service实现
* @createDate 2023-03-02 10:10:41
*/
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UUserInfo>
    implements UserInfoService{

    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public UUserInfo freeze(String telephone) {
        UUserInfo freeze = userInfoMapper.freeze(telephone);
        return freeze;
    }

    @Override
    public Result register(UUserInfo uUserInfo) {
        int insert = userInfoMapper.insert(uUserInfo);
        if (insert!=0){
            return new Result(2000,"注册成功");
        }
        return  new Result(5000,"注册失败");
    }


}




